package com.zhongge.stack;

import java.util.Stack;

/**
 * @ClassName Stack_
 * @Description TODO 集合底层的栈
 * @Author 笨忠
 * @Date 2025/8/23 8:35
 * @Version 1.0
 */
public class Stack_ {
    public static void main(String[] args) {
        Stack<Integer> stack  = new Stack<>();

        //入栈
        stack.push(10);
        stack.push(23);
        stack.push(12);

        //出栈
        System.out.println(stack.pop());
        //获取栈顶元素
        System.out.println(stack.peek());
    }
}
